#pragma once

unsigned inline mod(int a, unsigned n) {
	if (a >= 0)
		return a%n;
	else
		return mod(a+n, n);
}
